pre.shiki {
  overflow: hidden;
  height: 100%;
}
pre.shiki:hover .dim {
  opacity: 1;
}
pre.shiki div.dim {
  opacity: 0.5;
}
pre.shiki div.dim,
pre.shiki div.highlight {
  margin: 0;
  padding: 0;
}
pre.shiki div.highlight {
  opacity: 1;
  background-color: #f1f8ff;
}
pre.shiki div.line {
  /* min-height: 1rem; */
  counter-increment: lineNumber 1;
}

pre.shiki div.line::before {
  content: counter(lineNumber);
  display: inline-block;
  vertical-align: middle;
  width: 1.3rem;
  padding-right: 0.3rem;
  text-align: right;
  transition: color 0.3s;
  @apply text-stone-200/70 dark:text-stone-900 text-[0.65rem];
}

pre.shiki div.line:hover::before {
  @apply text-stone-400 dark:text-stone-600;
}

/** Don't show the language identifiers */
pre.shiki .language-id {
  display: none;
}

/** When you mouse over the pre, show the underlines */
pre.twoslash:hover data-lsp {
  @apply border-dotted border-b border-stone-300 dark:border-stone-700;
}

/** The tooltip-like which provides the LSP response */
pre.twoslash data-lsp::before {
  content: attr(lsp);
  position: absolute;
  transform: translate(0, 1.2rem);
  max-width: 30rem;
  @apply text-xs px-1.5 py-1 rounded border shadow-lg overflow-hidden whitespace-pre-wrap text-stone-700 bg-stone-50 dark:text-stone-200 dark:bg-stone-950;
  text-align: left;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  display: none;
}

pre.twoslash data-lsp:hover::before {
  display: block;
  opacity: 1;
  pointer-events: visible;
  width: auto;
  height: auto;
}

.shiki-outer {
  @apply shadow-sm rounded-xl;
}

.shiki-filename {
  @apply px-3 py-2 bg-stone-100 text-stone-700 dark:bg-stone-900 dark:text-stone-300 rounded-t-xl text-xs;
}

pre .code-container {
  @apply overflow-auto p-2 pl-0 bg-white dark:bg-stone-925 rounded-b-xl text-xs h-full;
}
/* The try button */
pre .code-container > a {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 4px;
  border: 1px solid #719af4;
  padding: 0 8px;
  color: #719af4;
  text-decoration: none;
  opacity: 0;
  transition-timing-function: ease;
  transition: opacity 0.3s;
}
/* Respect no animations */
@media (prefers-reduced-motion: reduce) {
  pre .code-container > a {
    transition: none;
  }
}
pre .code-container > a:hover {
  color: white;
  background-color: #719af4;
}
pre .code-container:hover a {
  opacity: 1;
}

pre code {
  white-space: pre;
}
pre code a {
  text-decoration: none;
}
pre data-err {
  /* Extracted from VS Code */
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")
    repeat-x bottom left;
  padding-bottom: 3px;
}
pre .query {
  margin-bottom: 10px;
  color: #137998;
  display: inline-block;
}

/* In order to have the 'popped out' style design and to not break the layout
/* we need to place a fake and un-selectable copy of the error which _isn't_ broken out
/* behind the actual error message.

/* This sections keeps both of those two in in sync  */

pre .error,
pre .error-behind {
  margin-left: -14px;
  margin-top: 8px;
  margin-bottom: 4px;
  padding: 6px;
  padding-left: 14px;
  width: calc(100% - 20px);
  white-space: pre-wrap;
  display: block;
}
pre .error {
  position: absolute;
  background-color: #fee;
  border-left: 2px solid #bf1818;
  /* Give the space to the error code */
  display: flex;
  align-items: center;
  color: black;
}
pre .error .code {
  display: none;
}
pre .error-behind {
  user-select: none;
  visibility: transparent;
  color: #fee;
}
/* Queries */
pre .arrow {
  /* Transparent background */
  background-color: #eee;
  position: relative;
  top: -7px;
  margin-left: 0.1rem;
  /* Edges */
  border-left: 1px solid #eee;
  border-top: 1px solid #eee;
  transform: translateY(25%) rotate(45deg);
  /* Size */
  height: 8px;
  width: 8px;
}
pre .popover {
  margin-bottom: 10px;
  background-color: #eee;
  display: inline-block;
  padding: 0 0.5rem 0.3rem;
  margin-top: 10px;
  border-radius: 3px;
}
/* Completion */
pre .inline-completions ul.dropdown {
  display: inline-block;
  position: absolute;
  width: 240px;
  background-color: gainsboro;
  color: grey;
  padding-top: 4px;
  font-family: var(--code-font);
  font-size: 0.8rem;
  margin: 0;
  padding: 0;
  border-left: 4px solid #4b9edd;
}
pre .inline-completions ul.dropdown::before {
  background-color: #4b9edd;
  width: 2px;
  position: absolute;
  top: -1.2rem;
  left: -3px;
  content: " ";
}
pre .inline-completions ul.dropdown li {
  overflow-x: hidden;
  padding-left: 4px;
  margin-bottom: 4px;
}
pre .inline-completions ul.dropdown li.deprecated {
  text-decoration: line-through;
}
pre .inline-completions ul.dropdown li span.result-found {
  color: #4b9edd;
}
pre .inline-completions ul.dropdown li span.result {
  width: 100px;
  color: black;
  display: inline-block;
}
.dark-theme .markdown pre {
  background-color: #d8d8d8;
  border-color: #ddd;
  filter: invert(98%) hue-rotate(180deg);
}
data-lsp {
  /* Ensures there's no 1px jump when the hover happens */
  border-bottom: 1px dotted transparent;
  /* Fades in unobtrusively */
  transition-timing-function: ease;
  transition: border-color 0.3s;
}
/* Respect people's wishes to not have animations */
@media (prefers-reduced-motion: reduce) {
  data-lsp {
    transition: none;
  }
}

/** Annotations support, providing a tool for meta commentary */
.tag-container {
  position: relative;
}
.tag-container .twoslash-annotation {
  position: absolute;
  font-family:
    "JetBrains Mono",
    Menlo,
    Monaco,
    Consolas,
    Courier New,
    monospace;
  right: -10px;
  /** Default annotation text to 200px */
  width: 200px;
  color: #187abf;
  background-color: #fcf3d9 bb;
}
.tag-container .twoslash-annotation p {
  text-align: left;
  font-size: 0.8rem;
  line-height: 0.9rem;
}
.tag-container .twoslash-annotation svg {
  float: left;
  margin-left: -44px;
}
.tag-container .twoslash-annotation.left {
  right: auto;
  left: -200px;
}
.tag-container .twoslash-annotation.left svg {
  float: right;
  margin-right: -5px;
}

/** Support for showing console log/warn/errors inline */
pre .logger {
  display: flex;
  align-items: center;
  color: black;
  padding: 6px;
  padding-left: 8px;
  width: calc(100% - 19px);
  white-space: pre-wrap;
}
pre .logger svg {
  margin-right: 9px;
}
pre .logger.error-log {
  background-color: #fee;
  border-left: 2px solid #bf1818;
}
pre .logger.warn-log {
  background-color: #ffe;
  border-left: 2px solid #eae662;
}
pre .logger.log-log {
  background-color: #e9e9e9;
  border-left: 2px solid #ababab;
}
pre .logger.log-log svg {
  margin-left: 6px;
  margin-right: 9px;
}

body {
  --shiki-color-text: #606060;
  --shiki-color-background: transparent;
  --shiki-token-constant: #00a5a5;
  --shiki-token-string: #4e3a2c;
  --shiki-token-comment: #aaa;
  --shiki-token-keyword: #7b8bff;
  --shiki-token-parameter: #ff9800;
  --shiki-token-function: #445dd7;
  --shiki-token-string-expression: #38a35f;
  --shiki-token-punctuation: #969696;
  --shiki-token-link: #1aa245;
}

.dark body {
  --shiki-color-text: #d1d1d1;
  --shiki-token-constant: #2dc9c9;
  --shiki-token-string: #feb179;
  --shiki-token-comment: #6b737c;
  --shiki-token-keyword: #7b8bff;
  --shiki-token-parameter: #ff9800;
  --shiki-token-function: #9babff;
  --shiki-token-string-expression: #42bb69;
  --shiki-token-punctuation: #bbb;
  --shiki-token-link: #ffab70;
}
